//
//  ViewController.m
//  03-homework
//
//  Created by dllo on 16/7/18.
//  Copyright © 2016年 YMJ. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    self.view.backgroundColor = [UIColor whiteColor];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 50)];
    label.backgroundColor = [UIColor yellowColor];
    label.text = @"更多";
    label.textAlignment = 1;
    label.textColor = [UIColor redColor];
    label.layer.cornerRadius = 10;
    label.layer.borderWidth = 1;
    label.layer.masksToBounds = YES;
    label.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(click:)];
    [label addGestureRecognizer:tap];
    [self.view addSubview:label];
    
    UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_qqZone@3x"]];
    imageView.frame = CGRectMake(150, 0, 50, 50);
    UITapGestureRecognizer *imageTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(clickImage:)];
    [imageView addGestureRecognizer:imageTap];
    imageView.userInteractionEnabled = YES;

    [self.view addSubview:imageView];
}
- (void)clickImage:(UITapGestureRecognizer *)tap {
    NSLog(@"正在进入空间...");
}
- (void)click:(UITapGestureRecognizer *)tap {
    NSLog(@"没有更多了");
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
